<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAfterSaleOrderAuditsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('after_sale_order_audits', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('after_sale_order_id')->comment('售后订单表 ID');
            $table->bigInteger('operator_id')->comment('操作人 ID');
            $table->string('audit_remarks')->default('')->comment('审核备注(意见内容)');
            $table->tinyInteger('status')->default(1)->comment('处理状态; 1:待审核 2:跟进中 3:已通过 4:未通过 5:已取消');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('after_sale_order_audits');
    }
}
